<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>这个routes映射要怎么传递参数</title>
		<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
		<script src="js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/Underscore-1.8.3min.js"></script>
		<script src="js/backbone.js"></script>
		<script type="text/javascript">
		</script>
	</head> 
	<body> 
		<a href="#/route/211">获取id的值是</a>
		<a href="#/posts/211">获取id的值是1</a>
		<script type="text/javascript">
			  var AppRouter=Backbone.Router.extend({
			  	 routes:{
			  	 	"posts/:id":"getPost",
			  	 	"download/*path":"downloadFile",
			  	 	":route/:action":"loadView",
			  	 	"*actions":"defaultRoute"
			  	 },
			  	 getPost:function(id){
			  	 	alert(id+"getPost");
			  	 },
			  	 defaultRoute:function(actions){
			  	 	alert(actions+"defaultRoute");
			  	 },
			  	  downloadFile:function(path){
			  	 	alert(path+"downloadFile");
			  	 },
			  	 loadView:function(route,action){
			  	 	alert(route+"____"+action+"loadView");
			  	 }
			  });
			  var router=new AppRouter;Backbone.history.start();
		</script> 
	</body>
</html>